﻿using Macro_stone.IRepository.SystemManager;
using Macro_stone.IRepository.SystemManager.CommonlyUsedManager;
using Macro_stone.PoModel;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using SystemCenterSoa.DtoModel.Common;

namespace Macro_stone.Service.SystemManager
{
    public class CustomerInputService
    {
        private ICustomerInputRepository _ICustomerInputRepository;
        public CustomerInputService(ICustomerInputRepository ICustomerInputRepository)
        {
            _ICustomerInputRepository = ICustomerInputRepository;
        }

        /// <summary>
        /// 添加基本信息
        /// </summary>
        /// <param name="view"></param>
        /// <returns></returns>
        public bool CustomerPoAdd(CustomerPo view)
        {

            return _ICustomerInputRepository.CustomerPoAdd(view);
        }

        /// <summary>
        /// 添加甲方负责人
        /// </summary>
        /// <param name="view"></param>
        /// <returns></returns>
        public bool ResponsiblePersonPoAdd(ResponsiblePersonPo view)
        {
            return _ICustomerInputRepository.ResponsiblePersonPoAdd(view);
        }

        /// <summary>
        /// 添加满意度调查
        /// </summary>
        /// <param name="view"></param>
        /// <returns></returns>
        public bool SatisfactionSurveyPoAdd(SatisfactionSurveyPo view)
        {
            return _ICustomerInputRepository.SatisfactionSurveyPoAdd(view);
        }

        /// <summary>
        /// 添加文件
        /// </summary>
        /// <param name="view"></param>
        /// <returns></returns>
        public bool AccessoryPoAdd(AccessoryPo view)
        {
            return _ICustomerInputRepository.AccessoryPoAdd(view);
        }

        /// <summary>
        /// 客户信息—显示(基础列表)
        /// </summary>
        /// <param name="searchModel"></param>
        /// <returns></returns>
        public List<CustomerPo> CustomerPoInquire(int pageIndex, int pageSize, int? createTime, string customerName, DateTime? beginTime, DateTime? endTime, string customerSerialNum, string linkman)
        {
            return _ICustomerInputRepository.CustomerPoInquire(pageIndex, pageSize, createTime, customerName, beginTime, endTime, customerSerialNum, linkman);
        }

        /// <summary>
        /// 联系人信息—显示
        /// </summary>
        /// <param name="searchModel"></param>
        /// <returns></returns>
        public List<CustomerPo> ResponsiblePersonPoInquire(int pageIndex, int pageSize, string personName, DateTime? entryTime, DateTime? abortTime)
        {
            return _ICustomerInputRepository.ResponsiblePersonPoInquire(pageIndex, pageSize, personName, entryTime, abortTime);
        }

        /// <summary>
        /// 联系人信息—反填
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public bool ResponsiblePersonPoBackfill(int id)
        {
            return _ICustomerInputRepository.ResponsiblePersonPoBackfill(id);
        }

        #region 你好，这里又是文件
        /// <summary>
        /// 项目前期信息—显示
        /// </summary>
        /// <param name="searchModel"></param>
        /// <returns></returns>
        public List<AccessoryPo> AccessoryDtoInquire(int pageIndex, int pageSize, string wenName, DateTime? begintime, DateTime? endtime)
        {
            return _ICustomerInputRepository.AccessoryDtoInquire(pageIndex, pageSize, wenName, begintime, endtime);
        }
        #endregion
        /// <summary>
        /// 项目前期信息—删除
        /// </summary>
        /// <param name="ids"></param>
        /// <returns></returns>
        public bool AccessoryDtoDelete(int ids)
        {
            return _ICustomerInputRepository.AccessoryDtoDelete(ids);
        }

        /// <summary>
        /// 项目前期信息—反填一条
        /// </summary>
        /// <param name="id"></param>
        /// <returns></returns>
        public AccessoryPo AccessoryPoOne(int id)
        {
            return _ICustomerInputRepository.AccessoryPoOne(id);

        }

        /// <summary>
        /// 项目前期信息—编辑
        /// </summary>
        /// <param name="view"></param>
        /// <returns></returns>
        public bool AccessoryDtoEdits(AccessoryPo view)
        {
            return _ICustomerInputRepository.AccessoryDtoEdits(view);
        }
        /// <summary>
        /// 项目前期信息—添加
        /// </summary>
        /// <param name="view"></param>
        /// <returns></returns>
        public bool AccessoryDtoAdd(AccessoryPo view)
        {
            return _ICustomerInputRepository.AccessoryDtoAdd(view);
        }


    }
}
